import type * as Merchant from './type'
import http from '@/utils/http'

const BASE_URL = '/merchant/personShopIdentification'

/** @desc 查询商铺认证列表 */
export function listPersonShopIdentification(query: Merchant.PersonShopIdentificationPageQuery) {
  return http.get<PageRes<Merchant.PersonShopIdentificationResp[]>>(`${BASE_URL}`, query)
}

/** @desc 查询商铺认证详情 */
export function getPersonShopIdentification(id: string) {
  return http.get<Merchant.PersonShopIdentificationDetailResp>(`${BASE_URL}/${id}`)
}

/** @desc 新增商铺认证 */
export function addPersonShopIdentification(data: any) {
  return http.post(`${BASE_URL}`, data)
}

/** @desc 修改商铺认证 */
export function updatePersonShopIdentification(data: any, id: string) {
  return http.put(`${BASE_URL}/${id}`, data)
}

/** @desc 删除商铺认证 */
export function deletePersonShopIdentification(id: string) {
  return http.del(`${BASE_URL}/${id}`)
}

/** @desc 导出商铺认证 */
export function exportPersonShopIdentification(query: Merchant.PersonShopIdentificationQuery) {
  return http.download<any>(`${BASE_URL}/export`, query)
}
